package ar.com.temporis.scrum.persistence;

import ar.com.temporis.framework.domain.Entity;
import ar.com.temporis.framework.persistence.PersistenceTestCase;
import ar.com.temporis.scrum.model.Task;
import ar.com.temporis.system.domain.User;

public class TaskPersistenceTestCase extends PersistenceTestCase {

	@Override
	protected Entity createEntity() {
		Task task = new Task();
		
		task.setEstimated(4L);
		task.setName("name");
		task.setAttendant(getUser());
		
		return task;
	}

	private User getUser() {
		return this.getAny(User.class);
	}

	@Override
	protected void modify(Entity entity) {
		Task task = (Task) entity;
		task.setName("xxxxxxxxxxx");
	}

}
